package org.learnredis.utils;


import org.learnredis.student.*;
import org.learnredis.university.*;

import java.util.Objects;

public class ProjectComparators {
    private ProjectComparators(){};

    public static StudentComparator getComparator(StudentComparators variant) {
        if (variant == StudentComparators.AVG_EXAM_SCORE) {
            return new AvgExamScoreComparator();
        }
        if (variant == StudentComparators.CURRENT_COURSE) {
            return new CurrentCourseComparator();
        }
        if (variant == StudentComparators.FULL_NAME) {
            return new FullNameComparator();
        }
        return null;
    }

    public static UniversityComparator getComparator(UniversityComparators variant) {
        if (variant == UniversityComparators.FULL_NAME) {
            return new FullNameComparatorUniversity();
        }
        if (variant == UniversityComparators.SHORT_NAME) {
            return new ShortNameComparatorUniversity();
        }
        if (variant == UniversityComparators.YEAR_OF_FOUNDATION) {
            return new YearOffFoundationComparator();
        }
        if (variant == UniversityComparators.STUDY_PROFILE) {
            return new MainProfileComparatorUniversity();
        }
        return null;
    }
}
